package cn.htu.msj.service.impl;

import cn.htu.msj.entity.User;
import cn.htu.msj.repositories.UserRepository;
import cn.htu.msj.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class UserServiceImpl implements UserService{

    @Autowired
    private UserRepository userRepository;

    @Override
    public Iterable<User> findAll() {

        Iterable<User> users = userRepository.findAll();

        return users;
    }
}
